home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / DTS Sample Code / Macintosh Sample Code / Monthly Releases (Compressed) / MacDTS.Sample.Code.89.06.sit / SC.013.OOPTESample / SCN.013.OOPTESample < prev    next >
MacBinary  |  1989-04-23  |  5.5 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Apr 23 08:14:50 1989, modified Sun Apr 23 08:14:50 1989, creator 'MPS ', type ASCII, 5080 bytes "SCN.013.OOPTESample" , at 0x1458 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 53 43 4e 2e 30 31 | 33 2e 4f 4f 50 54 45 53 |..SCN.01|3.OOPTES|
|00000010| 61 6d 70 6c 65 00 00 00 | 00 00 00 00 00 00 00 00 |ample...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 13 d8 00 | 00 01 7e a0 77 6e ba a0 |........|..~.wn..|
|00000060| 77 6e ba 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |wn......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4e c2 00 00 |........|....N...|
|00000080| 4d 61 63 69 6e 74 6f 73 | 68 0d 53 61 6d 70 6c 65 |Macintos|h.Sample|
|00000090| 20 43 6f 64 65 20 4e 6f | 74 65 73 0d 5f 5f 5f 5f | Code No|tes.____|
|000000a0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000000b0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000000c0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000000d0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000000e0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 0d 20 20 20 20 20 20 |________|_. |
|000000f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000110| 20 20 20 20 20 20 20 20 | 20 20 20 20 44 65 76 65 | | Deve|
|00000120| 6c 6f 70 65 72 20 54 65 | 63 68 6e 69 63 61 6c 20 |loper Te|chnical |
|00000130| 53 75 70 70 6f 72 74 0d | 0d 23 31 33 3a 09 4f 4f |Support.|.#13:.OO|
|00000140| 50 54 45 53 61 6d 70 6c | 65 0d 0d 57 72 69 74 74 |PTESampl|e..Writt|
|00000150| 65 6e 20 62 79 3a 09 4b | 65 69 74 68 20 52 6f 6c |en by:.K|eith Rol|
|00000160| 6c 69 6e 0d 0d 56 65 72 | 73 69 6f 6e 73 3a 09 09 |lin..Ver|sions:..|
|00000170| 09 31 2e 30 30 09 09 09 | 09 09 09 41 70 72 69 6c |.1.00...|...April|
|00000180| 20 31 39 38 39 0d 0d 43 | 6f 6d 70 6f 6e 65 6e 74 | 1989..C|omponent|
|00000190| 73 3a 09 09 09 42 75 69 | 6c 64 4f 4f 50 54 45 53 |s:...Bui|ldOOPTES|
|000001a0| 61 6d 70 6c 65 09 09 09 | 41 70 72 69 6c 20 31 2c |ample...|April 1,|
|000001b0| 20 31 39 38 39 0d 09 09 | 09 09 09 4d 4f 4f 50 54 | 1989...|...MOOPT|
|000001c0| 45 53 61 6d 70 6c 65 2e | 70 09 09 09 09 41 70 72 |ESample.|p....Apr|
|000001d0| 69 6c 20 31 2c 20 31 39 | 38 39 0d 09 09 09 09 09 |il 1, 19|89......|
|000001e0| 4f 4f 50 54 45 53 61 6d | 70 6c 65 2e 6d 61 6b 65 |OOPTESam|ple.make|
|000001f0| 09 09 09 41 70 72 69 6c | 20 31 2c 20 31 39 38 39 |...April| 1, 1989|
|00000200| 0d 09 09 09 09 09 54 45 | 43 6f 6d 6d 6f 6e 2e 68 |......TE|Common.h|
|00000210| 09 09 09 09 09 41 70 72 | 69 6c 20 31 2c 20 31 39 |.....Apr|il 1, 19|
|00000220| 38 39 0d 09 09 09 09 09 | 54 45 53 61 6d 70 6c 65 |89......|TESample|
|00000230| 47 6c 75 65 2e 61 09 09 | 09 09 41 70 72 69 6c 20 |Glue.a..|..April |
|00000240| 31 2c 20 31 39 38 39 0d | 09 09 09 09 09 54 45 53 |1, 1989.|.....TES|
|00000250| 61 6d 70 6c 65 2e 72 09 | 09 09 09 09 41 70 72 69 |ample.r.|....Apri|
|00000260| 6c 20 31 2c 20 31 39 38 | 39 0d 09 09 09 09 09 55 |l 1, 198|9......U|
|00000270| 41 70 70 6c 69 63 61 74 | 69 6f 6e 2e 70 09 09 09 |Applicat|ion.p...|
|00000280| 09 41 70 72 69 6c 20 31 | 2c 20 31 39 38 39 0d 09 |.April 1|, 1989..|
|00000290| 09 09 09 09 55 41 70 70 | 6c 69 63 61 74 69 6f 6e |....UApp|lication|
|000002a0| 2e 69 6e 63 31 2e 70 09 | 09 09 41 70 72 69 6c 20 |.inc1.p.|..April |
|000002b0| 31 2c 20 31 39 38 39 0d | 09 09 09 09 09 55 44 6f |1, 1989.|.....UDo|
|000002c0| 63 75 6d 65 6e 74 2e 70 | 09 09 09 09 09 41 70 72 |cument.p|.....Apr|
|000002d0| 69 6c 20 31 2c 20 31 39 | 38 39 0d 09 09 09 09 09 |il 1, 19|89......|
|000002e0| 55 44 6f 63 75 6d 65 6e | 74 2e 69 6e 63 31 2e 70 |UDocumen|t.inc1.p|
|000002f0| 09 09 09 41 70 72 69 6c | 20 31 2c 20 31 39 38 39 |...April| 1, 1989|
|00000300| 0d 09 09 09 09 09 55 54 | 45 44 6f 63 75 6d 65 6e |......UT|EDocumen|
|00000310| 74 2e 70 09 09 09 09 41 | 70 72 69 6c 20 31 2c 20 |t.p....A|pril 1, |
|00000320| 31 39 38 39 0d 09 09 09 | 09 09 55 54 45 44 6f 63 |1989....|..UTEDoc|
|00000330| 75 6d 65 6e 74 2e 69 6e | 63 31 2e 70 09 09 09 41 |ument.in|c1.p...A|
|00000340| 70 72 69 6c 20 31 2c 20 | 31 39 38 39 0d 09 09 09 |pril 1, |1989....|
|00000350| 09 09 55 54 45 53 61 6d | 70 6c 65 2e 70 09 09 09 |..UTESam|ple.p...|
|00000360| 09 09 41 70 72 69 6c 20 | 31 2c 20 31 39 38 39 0d |..April |1, 1989.|
|00000370| 09 09 09 09 09 55 54 45 | 53 61 6d 70 6c 65 2e 69 |.....UTE|Sample.i|
|00000380| 6e 63 31 2e 70 09 09 09 | 41 70 72 69 6c 20 31 2c |nc1.p...|April 1,|
|00000390| 20 31 39 38 39 0d 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f | 1989.__|________|
|000003a0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000003b0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000003c0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000003d0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000003e0| 5f 5f 5f 0d 0d 54 68 65 | 20 62 75 69 6c 64 20 70 |___..The| build p|
|000003f0| 72 6f 63 65 73 73 20 66 | 6f 72 20 4f 4f 50 54 45 |rocess f|or OOPTE|
|00000400| 53 61 6d 70 6c 65 20 69 | 73 20 65 6e 74 69 72 65 |Sample i|s entire|
|00000410| 6c 79 20 61 75 74 6f 6d | 61 74 65 64 2e 20 20 41 |ly autom|ated. A|
|00000420| 6c 6c 20 79 6f 75 20 0d | 6e 65 65 64 20 74 6f 20 |ll you .|need to |
|00000430| 64 6f 20 69 73 20 72 75 | 6e 20 74 68 65 20 42 75 |do is ru|n the Bu|
|00000440| 69 6c 64 4f 4f 50 54 45 | 53 61 6d 70 6c 65 20 73 |ildOOPTE|Sample s|
|00000450| 63 72 69 70 74 2e 20 20 | 42 75 69 6c 64 4f 4f 50 |cript. |BuildOOP|
|00000460| 54 45 53 61 6d 70 6c 65 | 20 0d 69 73 20 61 20 76 |TESample| .is a v|
|00000470| 61 72 69 61 74 69 6f 6e | 20 6f 6e 20 74 68 65 20 |ariation| on the |
|00000480| 42 75 69 6c 64 50 72 6f | 67 72 61 6d 20 73 63 72 |BuildPro|gram scr|
|00000490| 69 70 74 20 74 68 61 74 | 20 63 6f 6d 65 73 20 73 |ipt that| comes s|
|000004a0| 74 61 6e 64 61 72 64 20 | 77 69 74 68 20 0d 4d 50 |tandard |with .MP|
|000004b0| 57 2e 20 20 49 74 20 63 | 72 65 61 74 65 73 20 61 |W. It c|reates a|
|000004c0| 20 66 6f 6c 64 65 72 20 | 74 6f 20 63 6f 6e 74 61 | folder |to conta|
|000004d0| 69 6e 20 74 68 65 20 69 | 6e 74 65 72 6d 65 64 69 |in the i|ntermedi|
|000004e0| 61 72 79 20 6f 62 6a 65 | 63 74 20 0d 66 69 6c 65 |ary obje|ct .file|
|000004f0| 73 2c 20 61 6e 64 20 74 | 68 65 6e 20 20 63 61 6c |s, and t|hen cal|
|00000500| 6c 73 20 4d 61 6b 65 20 | 77 69 74 68 20 74 68 65 |ls Make |with the|
|00000510| 20 66 69 6c 65 20 4f 4f | 50 54 45 53 61 6d 70 6c | file OO|PTESampl|
|00000520| 65 2e 6d 61 6b 65 2e 20 | 20 0d 4d 61 6b 65 d5 73 |e.make. | .Make.s|
|00000530| 20 6f 75 74 70 75 74 20 | 69 73 20 65 78 65 63 75 | output |is execu|
|00000540| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 66 69 6e |ted with| the fin|
|00000550| 61 6c 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 4f |al appli|cation O|
|00000560| 4f 50 54 45 53 61 6d 70 | 6c 65 20 0d 61 73 20 74 |OPTESamp|le .as t|
|00000570| 68 65 20 72 65 73 75 6c | 74 2e 0d 5f 5f 5f 5f 5f |he resul|t.._____|
|00000580| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000590| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000005a0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000005b0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000005c0| 5f 5f 5f 5f 5f 5f 5f 5f | 0d 0d 4f 4f 50 54 45 53 |________|..OOPTES|
|000005d0| 61 6d 70 6c 65 20 69 73 | 20 61 6e 20 65 78 61 6d |ample is| an exam|
|000005e0| 70 6c 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |ple appl|ication |
|000005f0| 74 68 61 74 20 64 65 6d | 6f 6e 73 74 72 61 74 65 |that dem|onstrate|
|00000600| 73 20 68 6f 77 20 74 6f | 20 0d 69 6e 69 74 69 61 |s how to| .initia|
|00000610| 6c 69 7a 65 20 74 68 65 | 20 63 6f 6d 6d 6f 6e 6c |lize the| commonl|
|00000620| 79 20 75 73 65 64 20 54 | 6f 6f 6c 62 6f 78 20 6d |y used T|oolbox m|
|00000630| 61 6e 61 67 65 72 73 2c | 20 6f 70 65 72 61 74 65 |anagers,| operate|
|00000640| 20 0d 73 75 63 63 65 73 | 73 66 75 6c 6c 79 20 75 | .succes|sfully u|
|00000650| 6e 64 65 72 20 4d 75 6c | 74 69 46 69 6e 64 65 72 |nder Mul|tiFinder|
|00000660| 2c 20 68 61 6e 64 6c 65 | 20 64 65 73 6b 20 61 63 |, handle| desk ac|
|00000670| 63 65 73 73 6f 72 69 65 | 73 2c 20 61 6e 64 20 0d |cessorie|s, and .|
|00000680| 63 72 65 61 74 65 2c 20 | 67 72 6f 77 2c 20 61 6e |create, |grow, an|
|00000690| 64 20 7a 6f 6f 6d 20 77 | 69 6e 64 6f 77 73 2e 20 |d zoom w|indows. |
|000006a0| 20 49 74 20 64 65 6d 6f | 6e 73 74 72 61 74 65 73 | It demo|nstrates|
|000006b0| 20 66 75 6e 64 61 6d 65 | 6e 74 61 6c 20 0d 54 65 | fundame|ntal .Te|
|000006c0| 78 74 45 64 69 74 20 74 | 6f 6f 6c 62 6f 78 20 63 |xtEdit t|oolbox c|
|000006d0| 61 6c 6c 73 20 61 6e 64 | 20 54 65 78 74 45 64 69 |alls and| TextEdi|
|000006e0| 74 20 61 75 74 6f 6d 61 | 74 69 63 20 73 63 72 6f |t automa|tic scro|
|000006f0| 6c 6c 69 6e 67 2c 20 61 | 6e 64 20 69 74 20 0d 73 |lling, a|nd it .s|
|00000700| 68 6f 77 73 20 68 6f 77 | 20 74 6f 20 63 72 65 61 |hows how| to crea|
|00000710| 74 65 20 61 6e 64 20 6d | 61 69 6e 74 61 69 6e 20 |te and m|aintain |
|00000720| 73 63 72 6f 6c 6c 20 62 | 61 72 20 63 6f 6e 74 72 |scroll b|ar contr|
|00000730| 6f 6c 73 2e 0d 0d 54 68 | 69 73 20 76 65 72 73 69 |ols...Th|is versi|
|00000740| 6f 6e 20 6f 66 20 54 45 | 53 61 6d 70 6c 65 20 68 |on of TE|Sample h|
|00000750| 61 73 20 62 65 65 6e 20 | 73 75 62 73 74 61 6e 74 |as been |substant|
|00000760| 69 61 6c 6c 79 20 72 65 | 77 6f 72 6b 65 64 20 69 |ially re|worked i|
|00000770| 6e 20 4f 62 6a 65 63 74 | 20 0d 50 61 73 63 61 6c |n Object| .Pascal|
|00000780| 20 74 6f 20 73 68 6f 77 | 20 68 6f 77 20 61 20 d2 | to show| how a .|
|00000790| 74 79 70 69 63 61 6c d3 | 20 6f 62 6a 65 63 74 2d |typical.| object-|
|000007a0| 6f 72 69 65 6e 74 65 64 | 20 70 72 6f 67 72 61 6d |oriented| program|
|000007b0| 20 63 6f 75 6c 64 20 62 | 65 20 0d 77 72 69 74 74 | could b|e .writt|
|000007c0| 65 6e 2e 20 20 54 6f 20 | 74 68 69 73 20 65 6e 64 |en. To |this end|
|000007d0| 2c 20 77 68 61 74 20 77 | 61 73 20 6f 6e 63 65 20 |, what w|as once |
|000007e0| 61 20 73 69 6e 67 6c 65 | 20 73 6f 75 72 63 65 20 |a single| source |
|000007f0| 63 6f 64 65 20 66 69 6c | 65 20 68 61 73 20 0d 62 |code fil|e has .b|
|00000800| 65 65 6e 20 72 65 73 74 | 72 75 63 74 75 72 65 64 |een rest|ructured|
|00000810| 20 69 6e 74 6f 20 61 20 | 73 65 74 20 6f 66 20 63 | into a |set of c|
|00000820| 6c 61 73 73 65 73 20 77 | 68 69 63 68 20 64 65 6d |lasses w|hich dem|
|00000830| 6f 6e 73 74 72 61 74 65 | 20 74 68 65 20 0d 61 64 |onstrate| the .ad|
|00000840| 76 61 6e 74 61 67 65 73 | 20 6f 66 20 6f 62 6a 65 |vantages| of obje|
|00000850| 63 74 2d 6f 72 69 65 6e | 74 65 64 20 70 72 6f 67 |ct-orien|ted prog|
|00000860| 72 61 6d 6d 69 6e 67 2e | 0d 0d 54 68 65 72 65 20 |ramming.|..There |
|00000870| 61 72 65 20 66 6f 75 72 | 20 6d 61 69 6e 20 63 6c |are four| main cl|
|00000880| 61 73 73 65 73 20 69 6e | 20 74 68 69 73 20 70 72 |asses in| this pr|
|00000890| 6f 67 72 61 6d 2e 20 20 | 45 61 63 68 20 6f 6e 65 |ogram. |Each one|
|000008a0| 20 6f 66 20 74 68 65 73 | 65 20 0d 68 61 73 20 61 | of thes|e .has a|
|000008b0| 6e 20 69 6e 74 65 72 66 | 61 63 65 20 28 2e 70 29 |n interf|ace (.p)|
|000008c0| 20 66 69 6c 65 20 61 6e | 64 20 61 6e 20 69 6d 70 | file an|d an imp|
|000008d0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 28 2e 69 6e |lementat|ion (.in|
|000008e0| 63 31 2e 70 29 20 66 69 | 6c 65 2c 20 0d 61 6e 64 |c1.p) fi|le, .and|
|000008f0| 20 69 73 20 63 6f 6d 70 | 69 6c 65 64 20 69 6e 74 | is comp|iled int|
|00000900| 6f 20 69 74 73 20 6f 77 | 6e 20 73 65 70 61 72 61 |o its ow|n separa|
|00000910| 74 65 20 55 4e 49 54 2e | 0d 0d 54 68 65 20 54 41 |te UNIT.|..The TA|
|00000920| 70 70 6c 69 63 61 74 69 | 6f 6e 20 63 6c 61 73 73 |pplicati|on class|
|00000930| 20 64 6f 65 73 20 61 6c | 6c 20 6f 66 20 74 68 65 | does al|l of the|
|00000940| 20 62 61 73 69 63 20 65 | 76 65 6e 74 20 68 61 6e | basic e|vent han|
|00000950| 64 6c 69 6e 67 20 61 6e | 64 20 0d 69 6e 69 74 69 |dling an|d .initi|
|00000960| 61 6c 69 7a 61 74 69 6f | 6e 20 6e 65 63 65 73 73 |alizatio|n necess|
|00000970| 61 72 79 20 66 6f 72 20 | 4d 61 63 69 6e 74 6f 73 |ary for |Macintos|
|00000980| 68 20 54 6f 6f 6c 62 6f | 78 20 61 70 70 6c 69 63 |h Toolbo|x applic|
|00000990| 61 74 69 6f 6e 73 2e 20 | 20 49 74 20 0d 6d 61 69 |ations. | It .mai|
|000009a0| 6e 74 61 69 6e 73 20 61 | 20 6c 69 73 74 20 6f 66 |ntains a| list of|
|000009b0| 20 54 44 6f 63 75 6d 65 | 6e 74 20 6f 62 6a 65 63 | TDocume|nt objec|
|000009c0| 74 73 20 61 6e 64 20 70 | 61 73 73 65 73 20 65 76 |ts and p|asses ev|
|000009d0| 65 6e 74 73 20 74 6f 20 | 74 68 65 20 0d 63 6f 72 |ents to |the .cor|
|000009e0| 72 65 63 74 20 54 44 6f | 63 75 6d 65 6e 74 20 63 |rect TDo|cument c|
|000009f0| 6c 61 73 73 20 77 68 65 | 6e 20 61 70 70 72 6f 70 |lass whe|n approp|
|00000a00| 72 69 61 74 65 2e 0d 0d | 54 68 65 20 54 44 6f 63 |riate...|The TDoc|
|00000a10| 75 6d 65 6e 74 20 63 6c | 61 73 73 20 64 6f 65 73 |ument cl|ass does|
|00000a20| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 62 61 73 69 | all of |the basi|
|00000a30| 63 20 64 6f 63 75 6d 65 | 6e 74 20 68 61 6e 64 6c |c docume|nt handl|
|00000a40| 69 6e 67 20 77 6f 72 6b | 2e 20 20 0d 54 44 6f 63 |ing work|. .TDoc|
|00000a50| 75 6d 65 6e 74 73 20 61 | 72 65 20 6f 62 6a 65 63 |uments a|re objec|
|00000a60| 74 73 20 74 68 61 74 20 | 61 72 65 20 61 73 73 6f |ts that |are asso|
|00000a70| 63 69 61 74 65 64 20 77 | 69 74 68 20 61 20 77 69 |ciated w|ith a wi|
|00000a80| 6e 64 6f 77 2e 20 20 4d | 65 74 68 6f 64 73 20 0d |ndow. M|ethods .|
|00000a90| 61 72 65 20 70 72 6f 76 | 69 64 65 64 20 74 6f 20 |are prov|ided to |
|00000aa0| 64 65 61 6c 20 77 69 74 | 68 20 75 70 64 61 74 65 |deal wit|h update|
|00000ab0| 2c 20 61 63 74 69 76 61 | 74 65 2c 20 6d 6f 75 73 |, activa|te, mous|
|00000ac0| 65 2d 63 6c 69 63 6b 2c | 20 6b 65 79 2d 64 6f 77 |e-click,| key-dow|
|00000ad0| 6e 2c 20 0d 61 6e 64 20 | 6f 74 68 65 72 20 65 76 |n, .and |other ev|
|00000ae0| 65 6e 74 73 2e 20 20 53 | 6f 6d 65 20 61 64 64 69 |ents. S|ome addi|
|00000af0| 74 69 6f 6e 61 6c 20 63 | 6c 61 73 73 65 73 20 77 |tional c|lasses w|
|00000b00| 68 69 63 68 20 69 6d 70 | 6c 65 6d 65 6e 74 20 61 |hich imp|lement a|
|00000b10| 20 0d 6c 69 6e 6b 65 64 | 20 6c 69 73 74 20 6f 66 | .linked| list of|
|00000b20| 20 54 44 6f 63 75 6d 65 | 6e 74 20 6f 62 6a 65 63 | TDocume|nt objec|
|00000b30| 74 73 20 61 72 65 20 70 | 72 6f 76 69 64 65 64 2e |ts are p|rovided.|
|00000b40| 0d 0d 54 68 65 20 54 41 | 70 70 6c 69 63 61 74 69 |..The TA|pplicati|
|00000b50| 6f 6e 20 61 6e 64 20 54 | 44 6f 63 75 6d 65 6e 74 |on and T|Document|
|00000b60| 20 63 6c 61 73 73 65 73 | 20 74 6f 67 65 74 68 65 | classes| togethe|
|00000b70| 72 20 64 65 66 69 6e 65 | 20 61 20 62 61 73 69 63 |r define| a basic|
|00000b80| 20 0d 66 72 61 6d 65 77 | 6f 72 6b 20 66 6f 72 20 | .framew|ork for |
|00000b90| 4d 61 63 69 6e 74 6f 73 | 68 20 61 70 70 6c 69 63 |Macintos|h applic|
|00000ba0| 61 74 69 6f 6e 73 2c 20 | 77 69 74 68 6f 75 74 20 |ations, |without |
|00000bb0| 68 61 76 69 6e 67 20 61 | 6e 79 20 73 70 65 63 69 |having a|ny speci|
|00000bc0| 66 69 63 20 0d 6b 6e 6f | 77 6c 65 64 67 65 20 61 |fic .kno|wledge a|
|00000bd0| 62 6f 75 74 20 74 68 65 | 20 74 79 70 65 20 6f 66 |bout the| type of|
|00000be0| 20 64 61 74 61 20 62 65 | 69 6e 67 20 64 69 73 70 | data be|ing disp|
|00000bf0| 6c 61 79 65 64 20 62 79 | 20 74 68 65 20 0d 61 70 |layed by| the .ap|
|00000c00| 70 6c 69 63 61 74 69 6f | 6e d5 73 20 64 6f 63 75 |plicatio|n.s docu|
|00000c10| 6d 65 6e 74 73 2e 20 54 | 68 65 79 20 61 72 65 20 |ments. T|hey are |
|00000c20| 61 20 28 76 65 72 79 29 | 20 63 72 75 64 65 20 69 |a (very)| crude i|
|00000c30| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |mplement|ation of|
|00000c40| 20 0d 74 68 65 20 4d 61 | 63 41 70 70 20 61 70 70 | .the Ma|cApp app|
|00000c50| 6c 69 63 61 74 69 6f 6e | 20 6d 6f 64 65 6c 2c 20 |lication| model, |
|00000c60| 77 69 74 68 6f 75 74 20 | 74 68 65 20 73 6f 70 68 |without |the soph|
|00000c70| 69 73 74 69 63 61 74 65 | 64 20 76 69 65 77 20 0d |isticate|d view .|
|00000c80| 68 69 65 72 61 72 63 68 | 69 65 73 20 6f 72 20 61 |hierarch|ies or a|
|00000c90| 6e 79 20 72 65 61 6c 20 | 65 72 72 6f 72 20 68 61 |ny real |error ha|
|00000ca0| 6e 64 6c 69 6e 67 2e 0d | 0d 54 68 65 20 54 45 53 |ndling..|.The TES|
|00000cb0| 61 6d 70 6c 65 20 63 6c | 61 73 73 20 69 73 20 61 |ample cl|ass is a|
|00000cc0| 20 73 75 62 63 6c 61 73 | 73 20 6f 66 20 54 41 70 | subclas|s of TAp|
|00000cd0| 70 6c 69 63 61 74 69 6f | 6e 2e 20 20 49 74 20 6f |plicatio|n. It o|
|00000ce0| 76 65 72 72 69 64 65 73 | 20 0d 73 65 76 65 72 61 |verrides| .severa|
|00000cf0| 6c 20 54 41 70 70 6c 69 | 63 61 74 69 6f 6e 20 6d |l TAppli|cation m|
|00000d00| 65 74 68 6f 64 73 2c 20 | 69 6e 63 6c 75 64 69 6e |ethods, |includin|
|00000d10| 67 20 74 68 6f 73 65 20 | 66 6f 72 20 68 61 6e 64 |g those |for hand|
|00000d20| 6c 69 6e 67 20 6d 65 6e | 75 20 0d 63 6f 6d 6d 61 |ling men|u .comma|
|00000d30| 6e 64 73 20 61 6e 64 20 | 63 75 72 73 6f 72 20 61 |nds and |cursor a|
|00000d40| 64 6a 75 73 74 6d 65 6e | 74 2c 20 61 6e 64 20 69 |djustmen|t, and i|
|00000d50| 74 20 64 6f 65 73 20 73 | 6f 6d 65 20 6e 65 63 65 |t does s|ome nece|
|00000d60| 73 73 61 72 79 20 0d 69 | 6e 69 74 69 61 6c 69 7a |ssary .i|nitializ|
|00000d70| 61 74 69 6f 6e 2e 20 20 | 4e 6f 74 65 20 74 68 61 |ation. |Note tha|
|00000d80| 74 20 77 65 20 6f 6e 6c | 79 20 6e 65 65 64 20 74 |t we onl|y need t|
|00000d90| 6f 20 6f 76 65 72 72 69 | 64 65 20 6e 69 6e 65 20 |o overri|de nine |
|00000da0| 6d 65 74 68 6f 64 73 20 | 0d 74 6f 20 63 72 65 61 |methods |.to crea|
|00000db0| 74 65 20 61 20 75 73 65 | 66 75 6c 20 61 70 70 6c |te a use|ful appl|
|00000dc0| 69 63 61 74 69 6f 6e 20 | 63 6c 61 73 73 2e 0d 0d |ication |class...|
|00000dd0| 54 68 65 20 54 45 44 6f | 63 75 6d 65 6e 74 20 63 |The TEDo|cument c|
|00000de0| 6c 61 73 73 20 69 73 20 | 61 20 73 75 62 63 6c 61 |lass is |a subcla|
|00000df0| 73 73 20 6f 66 20 54 44 | 6f 63 75 6d 65 6e 74 2e |ss of TD|ocument.|
|00000e00| 20 20 54 68 69 73 20 63 | 6c 61 73 73 20 0d 63 6f | This c|lass .co|
|00000e10| 6e 74 61 69 6e 73 20 6d | 6f 73 74 20 6f 66 20 74 |ntains m|ost of t|
|00000e20| 68 65 20 73 70 65 63 69 | 61 6c 2d 70 75 72 70 6f |he speci|al-purpo|
|00000e30| 73 65 20 63 6f 64 65 20 | 66 6f 72 20 74 65 78 74 |se code |for text|
|00000e40| 20 65 64 69 74 69 6e 67 | 2e 20 20 49 6e 20 0d 61 | editing|. In .a|
|00000e50| 64 64 69 74 69 6f 6e 20 | 74 6f 20 6f 76 65 72 72 |ddition |to overr|
|00000e60| 69 64 69 6e 67 20 6d 6f | 73 74 20 6f 66 20 74 68 |iding mo|st of th|
|00000e70| 65 20 54 44 6f 63 75 6d | 65 6e 74 20 6d 65 74 68 |e TDocum|ent meth|
|00000e80| 6f 64 73 2c 20 69 74 20 | 64 65 66 69 6e 65 73 20 |ods, it |defines |
|00000e90| 61 20 0d 6e 75 6d 62 65 | 72 20 6f 66 20 61 64 64 |a .numbe|r of add|
|00000ea0| 69 74 69 6f 6e 61 6c 20 | 6d 65 74 68 6f 64 73 20 |itional |methods |
|00000eb0| 77 68 69 63 68 20 61 72 | 65 20 75 73 65 64 20 62 |which ar|e used b|
|00000ec0| 79 20 74 68 65 20 54 45 | 53 61 6d 70 6c 65 20 63 |y the TE|Sample c|
|00000ed0| 6c 61 73 73 20 0d 74 6f | 20 67 65 74 20 69 6e 66 |lass .to| get inf|
|00000ee0| 6f 72 6d 61 74 69 6f 6e | 20 6f 6e 20 74 68 65 20 |ormation| on the |
|00000ef0| 64 6f 63 75 6d 65 6e 74 | 20 73 74 61 74 65 2e 0d |document| state..|
|00000f00| 0d 54 68 69 73 20 70 72 | 6f 67 72 61 6d 20 63 6f |.This pr|ogram co|
|00000f10| 6e 73 69 73 74 73 20 6f | 66 20 66 6f 75 72 20 73 |nsists o|f four s|
|00000f20| 65 67 6d 65 6e 74 73 2e | 20 20 d2 4d 61 69 6e d3 |egments.| .Main.|
|00000f30| 20 63 6f 6e 74 61 69 6e | 73 20 6d 6f 73 74 20 6f | contain|s most o|
|00000f40| 66 20 0d 74 68 65 20 63 | 6f 64 65 2c 20 69 6e 63 |f .the c|ode, inc|
|00000f50| 6c 75 64 69 6e 67 20 74 | 68 65 20 4d 50 57 20 6c |luding t|he MPW l|
|00000f60| 69 62 72 61 72 69 65 73 | 20 61 6e 64 20 74 68 65 |ibraries| and the|
|00000f70| 20 6d 61 69 6e 20 70 72 | 6f 67 72 61 6d 2e 20 20 | main pr|ogram. |
|00000f80| 0d d2 49 6e 69 74 69 61 | 6c 69 7a 65 d3 20 63 6f |..Initia|lize. co|
|00000f90| 6e 74 61 69 6e 73 20 63 | 6f 64 65 20 74 68 61 74 |ntains c|ode that|
|00000fa0| 20 69 73 20 75 73 65 64 | 20 6f 6e 6c 79 20 6f 6e | is used| only on|
|00000fb0| 63 65 2c 20 6f 72 20 72 | 61 72 65 6c 79 2c 20 61 |ce, or r|arely, a|
|00000fc0| 6e 64 20 0d 63 61 6e 20 | 62 65 20 75 6e 6c 6f 61 |nd .can |be unloa|
|00000fd0| 64 65 64 20 61 66 74 65 | 72 20 74 68 65 20 65 76 |ded afte|r the ev|
|00000fe0| 65 6e 74 20 6c 6f 6f 70 | 20 69 73 20 63 6f 6d 70 |ent loop| is comp|
|00000ff0| 6c 65 74 65 64 2e 20 20 | d2 25 41 35 49 6e 69 74 |leted. |.%A5Init|
|00001000| d3 20 69 73 20 0d 61 75 | 74 6f 6d 61 74 69 63 61 |. is .au|tomatica|
|00001010| 6c 6c 79 20 63 72 65 61 | 74 65 64 20 62 79 20 74 |lly crea|ted by t|
|00001020| 68 65 20 4c 69 6e 6b 65 | 72 20 74 6f 20 69 6e 69 |he Linke|r to ini|
|00001030| 74 69 61 6c 69 7a 65 20 | 67 6c 6f 62 61 6c 73 20 |tialize |globals |
|00001040| 66 6f 72 20 74 68 65 20 | 0d 4d 50 57 20 6c 69 62 |for the |.MPW lib|
|00001050| 72 61 72 69 65 73 20 61 | 6e 64 20 69 73 20 75 6e |raries a|nd is un|
|00001060| 6c 6f 61 64 65 64 20 72 | 69 67 68 74 20 61 77 61 |loaded r|ight awa|
|00001070| 79 2e 20 20 d2 25 5f 4d | 65 74 68 54 61 62 6c 65 |y. .%_M|ethTable|
|00001080| 73 d3 20 69 73 20 61 20 | 0d 66 61 6b 65 20 73 65 |s. is a |.fake se|
|00001090| 67 6d 65 6e 74 20 75 73 | 65 64 20 62 79 20 4f 62 |gment us|ed by Ob|
|000010a0| 6a 65 63 74 20 50 61 73 | 63 61 6c 20 74 6f 20 6d |ject Pas|cal to m|
|000010b0| 61 69 6e 74 61 69 6e 20 | 6f 62 6a 65 63 74 20 0d |aintain |object .|
|000010c0| 72 65 6c 61 74 69 6f 6e | 73 68 69 70 73 2e 0d 0d |relation|ships...|
|000010d0| 54 6f 6f 6c 62 6f 78 20 | 72 6f 75 74 69 6e 65 73 |Toolbox |routines|
|000010e0| 20 64 6f 20 6e 6f 74 20 | 63 68 61 6e 67 65 20 74 | do not |change t|
|000010f0| 68 65 20 63 75 72 72 65 | 6e 74 20 70 6f 72 74 2e |he curre|nt port.|
|00001100| 20 20 49 6e 20 73 70 69 | 74 65 20 6f 66 20 0d 74 | In spi|te of .t|
|00001110| 68 69 73 2c 20 69 6e 20 | 74 68 69 73 20 70 72 6f |his, in |this pro|
|00001120| 67 72 61 6d 20 77 65 20 | 75 73 65 20 61 20 73 74 |gram we |use a st|
|00001130| 72 61 74 65 67 79 20 6f | 66 20 63 61 6c 6c 69 6e |rategy o|f callin|
|00001140| 67 20 5f 53 65 74 50 6f | 72 74 20 0d 77 68 65 6e |g _SetPo|rt .when|
|00001150| 65 76 65 72 20 77 65 20 | 77 61 6e 74 20 74 6f 20 |ever we |want to |
|00001160| 64 72 61 77 20 6f 72 20 | 6d 61 6b 65 20 63 61 6c |draw or |make cal|
|00001170| 6c 73 20 77 68 69 63 68 | 20 64 65 70 65 6e 64 20 |ls which| depend |
|00001180| 6f 6e 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 0d |on the c|urrent .|
|00001190| 70 6f 72 74 2e 20 20 54 | 68 69 73 20 70 72 65 63 |port. T|his prec|
|000011a0| 61 75 74 69 6f 6e 20 6d | 61 6b 65 73 20 75 73 20 |aution m|akes us |
|000011b0| 6c 65 73 73 20 76 75 6c | 6e 65 72 61 62 6c 65 20 |less vul|nerable |
|000011c0| 74 6f 20 62 75 67 73 20 | 69 6e 20 6f 74 68 65 72 |to bugs |in other|
|000011d0| 20 0d 73 6f 66 74 77 61 | 72 65 20 77 68 69 63 68 | .softwa|re which|
|000011e0| 20 6d 69 67 68 74 20 61 | 6c 74 65 72 20 74 68 65 | might a|lter the|
|000011f0| 20 63 75 72 72 65 6e 74 | 20 70 6f 72 74 20 28 73 | current| port (s|
|00001200| 75 63 68 20 61 73 20 74 | 68 65 20 62 75 67 20 0d |uch as t|he bug .|
|00001210| 28 66 65 61 74 75 72 65 | 3f 29 20 69 6e 20 6d 61 |(feature|?) in ma|
|00001220| 6e 79 20 64 65 73 6b 20 | 61 63 63 65 73 73 6f 72 |ny desk |accessor|
|00001230| 69 65 73 20 77 68 69 63 | 68 20 63 68 61 6e 67 65 |ies whic|h change|
|00001240| 73 20 74 68 65 20 70 6f | 72 74 20 77 68 65 6e 20 |s the po|rt when |
|00001250| 0d 74 68 65 72 65 20 69 | 73 20 61 20 63 61 6c 6c |.there i|s a call|
|00001260| 20 74 6f 20 5f 4f 70 65 | 6e 44 65 73 6b 41 63 63 | to _Ope|nDeskAcc|
|00001270| 29 2e 20 20 48 6f 70 65 | 66 75 6c 6c 79 2c 20 74 |). Hope|fully, t|
|00001280| 68 69 73 20 61 6c 73 6f | 20 6d 61 6b 65 73 20 74 |his also| makes t|
|00001290| 68 65 20 0d 72 6f 75 74 | 69 6e 65 73 20 66 72 6f |he .rout|ines fro|
|000012a0| 6d 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 6d |m this p|rogram m|
|000012b0| 6f 72 65 20 73 65 6c 66 | 2d 63 6f 6e 74 61 69 6e |ore self|-contain|
|000012c0| 65 64 2c 20 73 69 6e 63 | 65 20 74 68 65 79 20 64 |ed, sinc|e they d|
|000012d0| 6f 6e d5 74 20 0d 64 65 | 70 65 6e 64 20 6f 6e 20 |on.t .de|pend on |
|000012e0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 70 6f 72 74 |the curr|ent port|
|000012f0| 20 73 65 74 74 69 6e 67 | 2e 0d 0d 54 68 69 73 20 | setting|...This |
|00001300| 70 72 6f 67 72 61 6d 20 | 64 6f 65 73 20 6e 6f 74 |program |does not|
|00001310| 20 6d 61 69 6e 74 61 69 | 6e 20 61 20 70 72 69 76 | maintai|n a priv|
|00001320| 61 74 65 20 73 63 72 61 | 70 2e 20 20 57 68 65 6e |ate scra|p. When|
|00001330| 65 76 65 72 20 61 20 63 | 75 74 2c 20 0d 63 6f 70 |ever a c|ut, .cop|
|00001340| 79 2c 20 6f 72 20 70 61 | 73 74 65 20 6f 63 63 75 |y, or pa|ste occu|
|00001350| 72 73 2c 20 77 65 20 69 | 6d 70 6f 72 74 20 6f 72 |rs, we i|mport or|
|00001360| 20 65 78 70 6f 72 74 20 | 66 72 6f 6d 20 74 68 65 | export |from the|
|00001370| 20 70 75 62 6c 69 63 20 | 73 63 72 61 70 20 0d 74 | public |scrap .t|
|00001380| 6f 20 54 65 78 74 45 64 | 69 74 d5 73 20 73 63 72 |o TextEd|it.s scr|
|00001390| 61 70 20 72 69 67 68 74 | 20 61 77 61 79 2c 20 75 |ap right| away, u|
|000013a0| 73 69 6e 67 20 74 68 65 | 20 54 45 54 6f 53 63 72 |sing the| TEToScr|
|000013b0| 61 70 20 61 6e 64 20 0d | 54 45 46 72 6f 6d 53 63 |ap and .|TEFromSc|
|000013c0| 72 61 70 20 72 6f 75 74 | 69 6e 65 73 2e 20 20 49 |rap rout|ines. I|
|000013d0| 66 20 77 65 20 64 69 64 | 20 75 73 65 20 61 20 70 |f we did| use a p|
|000013e0| 72 69 76 61 74 65 20 73 | 63 72 61 70 2c 20 74 68 |rivate s|crap, th|
|000013f0| 65 20 69 6d 70 6f 72 74 | 20 0d 6f 72 20 65 78 70 |e import| .or exp|
|00001400| 6f 72 74 20 77 6f 75 6c | 64 20 62 65 20 69 6e 20 |ort woul|d be in |
|00001410| 74 68 65 20 61 63 74 69 | 76 61 74 65 20 6f 72 20 |the acti|vate or |
|00001420| 64 65 61 63 74 69 76 61 | 74 65 20 65 76 65 6e 74 |deactiva|te event|
|00001430| 20 61 6e 64 20 73 75 73 | 70 65 6e 64 20 0d 6f 72 | and sus|pend .or|
|00001440| 20 72 65 73 75 6d 65 20 | 65 76 65 6e 74 20 72 6f | resume |event ro|
|00001450| 75 74 69 6e 65 73 2e 0d | 00 00 00 00 00 00 00 00 |utines..|........|
|00001460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001480| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00001490| 63 6f 6d 6d 65 6e 64 20 | 74 68 61 74 20 79 6f 75 |commend |that you|
|000014a0| 20 72 65 76 69 65 77 20 | 53 61 6d 70 6c 65 20 6f | review |Sample o|
|000014b0| 13 53 43 4e 2e 30 31 33 | 2e 4f 4f 50 54 45 53 61 |.SCN.013|.OOPTESa|
|000014c0| 6d 70 6c 65 02 00 00 00 | 00 00 00 00 00 00 00 00 |mple....|........|
|000014d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014f0| 00 00 a0 a1 88 bf 00 00 | 00 00 00 00 01 7e 65 20 |........|.....~e |
|00001500| 77 68 65 6e 20 77 72 69 | 74 69 6e 67 20 61 20 0d |when wri|ting a .|
|00001510| 6e 65 77 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |new appl|ication.|
|00001520| 0d 00 00 00 00 00 00 00 | 00 00 00 ff ff 00 00 00 |........|........|
|00001530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001550| 00 00 00 00 ff 00 00 00 | ff ff 00 00 00 ff 00 00 |........|........|
|00001560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001570| ff ff 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001580| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 1e 00 f8 |...H..Mo|naco....|
|00001590| 00 b6 00 00 00 00 00 00 | 00 00 00 48 00 00 00 48 |........|...H...H|
|000015a0| 00 00 00 00 00 08 00 06 | 00 04 00 2a 00 03 01 dd |........|...*....|
|000015b0| 02 7d 01 2c 00 00 01 dd | 02 3d a0 77 36 7a 00 00 |.}.,....|.=.w6z..|
|000015c0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|000015d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 20 b0 dc |...L...L|...2. ..|
|000015e0| 0d 98 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000015f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 21 ec 34 00 00 |........|...!.4..|
+--------+-------------------------+-------------------------+--------+--------+